package com.qf.medicaldoctoradmin.healthHead.article.controller;

import com.qf.common.common.R;
import com.qf.common.entity.Articles;
import com.qf.medicaldoctoradmin.healthHead.article.service.HealthHeadService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;


@RestController
@CrossOrigin
@RequestMapping("/healthHead/article")
@Api(tags = "健康头条API")
public class HealthHeadController {

    @Resource
    private HealthHeadService healthHeadService;

    @PostMapping("/select")
    @ApiOperation(value = "获取健康头条文章详细信息", notes = "根据文章实体类来获取文章详细信息")
    public R selectList() {
        List<Articles> articles = healthHeadService.selectList();
        return R.ok(articles);
    }
}
